﻿Public Class About

    Private Sub About_Initialized(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Initialized
        lblProductName.Content = My.Application.Info.ProductName
        If System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString < "1.0.0" Then
            lblVersion.Content = "Version " & My.Application.Info.Version.ToString & " Alpha Release"
        Else
            lblVersion.Content = "Version " & My.Application.Info.Version.ToString & " Stable Release"
        End If
        lblCopyright.Content = My.Application.Info.Copyright
        lblCompanyName.Content = My.Application.Info.CompanyName
        Dim OSinfo As String
        'Set the variable OSinfo the the Major and Minor Version of the operating system
        OSinfo = System.Environment.OSVersion.Version.Major & "." & System.Environment.OSVersion.Version.Minor
        'Check the variable "OSinfo" for what version of Windows you are runnin and set the appropriate text
        If OSinfo < 6.0 Then
            txtDescription.Text = "TGCenter SmallScreen Edition is using the Windows XP Compatibility Mode. Upgrade to Windows 7 for the best experience of this program."
        ElseIf OSinfo = 6.0 Then
            txtDescription.Text = "TGCenter SmallScreen Edition is using the Windows Vista Compatibility Mode, some features of this program might not work correctly. Upgrade to Windows 7 for the best experience of this program."
        ElseIf OSinfo = 6.1 Then
            txtDescription.Text = "Congratulations, TGCenter SmallScreen Edition is using the Windows 7 Compatibility Mode. You are getting the best experience from this program."
        Else
            txtDescription.Text = "TGCenter SmallScreen Edition is using the Windows Codename 8 Compatibility Mode..." & Environment.NewLine & "You Sneaky Dog! Where did you get this from?"
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
        Me.Close()
    End Sub
End Class
